package leetcode.string;

public class Leet459 {
    public static void main(String[] args) {
        String s = "abcabcabcabc";
        boolean res = new Leet459().repeatedSubstringPattern(s);
    }

    public  boolean repeatedSubstringPattern(String s) {
        String str = s + s;
        String sss=str.substring(1,str.length()-1);
        return str.substring(1, str.length() - 1).contains(s);
    }

}
